9ee4f6ee305b82b68b61576bfd60bbc178657917,spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestBodyArgumentResolverTests.java,RequestBodyArgumentResolverTests,validateFluxTestBean,#,194
Before Change
@Test @SuppressWarnings("unchecked")
public void validateFluxTestBean() throws Exception {
String body = "[{\"bar\":\"b1\",\"foo\":\"f1\"},{\"bar\":\"b2\"}]";
Flux<TestBean> flux = (Flux<TestBean>) resolveValue("fluxTestBean", Flux.class, body);
TestSubscriber.subscribe(flux).assertValues(new TestBean("f1", "b1"))
.assertError(ServerWebInputException.class);
After Change
String body = "[{\"bar\":\"b1\",\"foo\":\"f1\"},{\"bar\":\"b2\"}]";
ResolvableType type = forClassWithGenerics(Flux.class, TestBean.class);
MethodParameter param = this.testMethod.resolveParam(type);
Flux<TestBean> flux = resolveValue(param, Flux.class, body);
TestSubscriber.subscribe(flux)
.assertValues(new TestBean("f1", "b1"))